package homework;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86185
 * Date: 2023-11-15
 * Time: 20:50
 */
public class H230727 {
    public static void main(String[] args) {
        Thread tc = new Thread(() -> {
            System.out.println(Thread.currentThread().getName() + " c");
        });
        Thread tb = new Thread(() -> {
            try {
                tc.join();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println(Thread.currentThread().getName() + " b");
        });
        Thread ta = new Thread(() -> {
            try {
                tb.join();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println(Thread.currentThread().getName() + " a");
        });
        ta.start();
        tb.start();
        tc.start();
    }
}
